/**
 * @param {string} s1
 * @param {string} s2
 * @return {boolean}
 *
 */
var isFlipedString = function (s1, s2) {
  let startIndex = s2.indexOf(s1[0])
  if (startIndex == -1) return false
  let count = 0
  while (count < s1.length) {
    if (s[count] == s2[startIndex]) {
    }
  }
}

console.log(isFlipedString('waterbottle', 'erbottlewat'))

/**
 * 
 *   if (s1.length != s2.length) return false
  if(s1 == s2) return tru
  let count = 0
  while (count < s2.length) {
    if (s1 == s2) return true
    else {
      let temp = s2[0]
      s2 = s2.slice(1)
      s2 = s2 + temp
    }

    count++
  }

  return  false
 * 
 */
